//
//  IslanSegView.m
//  diaoyuren
//
//  Created by 钓鱼人 on 16/5/12.
//  Copyright © 2016年 game. All rights reserved.
//

#import "IslanSegView.h"

@interface IslanSegView ()

@end

@implementation IslanSegView

-(void)awakeFromNib{

    UIFont *font = [UIFont boldSystemFontOfSize:SCREEN_WIDTH*0.043];
        NSDictionary *attributes = [NSDictionary dictionaryWithObject:font
                                                               forKey:UITextAttributeFont];
        [self.segment setTitleTextAttributes:attributes forState:UIControlStateNormal];

}
- (IBAction)back:(id)sender {
    
    if ([self.deleget respondsToSelector:@selector(GoBack)]) {
        [self.deleget GoBack];
    }
}

- (IBAction)segmentAction:(UISegmentedControl *)sender {
    
    NSInteger Index = sender.selectedSegmentIndex;
    
    if ([self.deleget respondsToSelector:@selector(segmentActionWhithIndex:)]) {
        [self.deleget segmentActionWhithIndex:Index];
    }

}
- (IBAction)searchAction:(id)sender {
    
    if ([self.deleget respondsToSelector:@selector(SeachWhithIndex:)]) {
        [self.deleget SeachWhithIndex:self.segment.selectedSegmentIndex];
    }
}

@end